home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / content / nsIDragDropHandler.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  128 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIDragDropHandler.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIDragDropHandler_h__
  6. #define __gen_nsIDragDropHandler_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMEventTarget; /* forward declaration */
  18.  
  19. class nsIWebNavigation; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIDragDropHandler */
  23. #define NS_IDRAGDROPHANDLER_IID_STR "4f418f58-f834-4736-a755-e0395bedca9d"
  24.  
  25. #define NS_IDRAGDROPHANDLER_IID \
  26.   {0x4f418f58, 0xf834, 0x4736, \
  27.     { 0xa7, 0x55, 0xe0, 0x39, 0x5b, 0xed, 0xca, 0x9d }}
  28.  
  29. /**
  30.  * @status UNDER_REVIEW
  31.  */
  32. /**
  33.  * Interface for communicating with the built-in drag and drop
  34.  * implementation in the content area. Use this to register where
  35.  * the listeners should attach (something that implements
  36.  * |nsIDOMEventReceiver| which is what we end up using under the hood).
  37.  */
  38. class NS_NO_VTABLE nsIDragDropHandler : public nsISupports {
  39.  public: 
  40.  
  41.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAGDROPHANDLER_IID)
  42.  
  43.   /**
  44.    * Attach drag handlers to receiver specified by |attachPoint| and
  45.    * specify callbacks to allow overriding of the built-in behaviors.
  46.    *
  47.    * @param attachPoint hookup listeners to this location
  48.    * @param navigator loads dropped urls via this interface. If NULL, 
  49.    *                   the client must handle the drop itself, either
  50.    *                   through the method provided via |overrideDrop| or
  51.    *                   by letting the event bubble up through the DOM.
  52.    */
  53.   /* void hookupTo (in nsIDOMEventTarget attachPoint, in nsIWebNavigation navigator); */
  54.   NS_IMETHOD HookupTo(nsIDOMEventTarget *attachPoint, nsIWebNavigation *navigator) = 0;
  55.  
  56.   /**
  57.    * Unregister all handlers related to drag&drop
  58.    */
  59.   /* void detach (); */
  60.   NS_IMETHOD Detach(void) = 0;
  61.  
  62. };
  63.  
  64. /* Use this macro when declaring classes that implement this interface. */
  65. #define NS_DECL_NSIDRAGDROPHANDLER \
  66.   NS_IMETHOD HookupTo(nsIDOMEventTarget *attachPoint, nsIWebNavigation *navigator); \
  67.   NS_IMETHOD Detach(void); 
  68.  
  69. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  70. #define NS_FORWARD_NSIDRAGDROPHANDLER(_to) \
  71.   NS_IMETHOD HookupTo(nsIDOMEventTarget *attachPoint, nsIWebNavigation *navigator) { return _to HookupTo(attachPoint, navigator); } \
  72.   NS_IMETHOD Detach(void) { return _to Detach(); } 
  73.  
  74. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  75. #define NS_FORWARD_SAFE_NSIDRAGDROPHANDLER(_to) \
  76.   NS_IMETHOD HookupTo(nsIDOMEventTarget *attachPoint, nsIWebNavigation *navigator) { return !_to ? NS_ERROR_NULL_POINTER : _to->HookupTo(attachPoint, navigator); } \
  77.   NS_IMETHOD Detach(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Detach(); } 
  78.  
  79. #if 0
  80. /* Use the code below as a template for the implementation class for this interface. */
  81.  
  82. /* Header file */
  83. class nsDragDropHandler : public nsIDragDropHandler
  84. {
  85. public:
  86.   NS_DECL_ISUPPORTS
  87.   NS_DECL_NSIDRAGDROPHANDLER
  88.  
  89.   nsDragDropHandler();
  90.  
  91. private:
  92.   ~nsDragDropHandler();
  93.  
  94. protected:
  95.   /* additional members */
  96. };
  97.  
  98. /* Implementation file */
  99. NS_IMPL_ISUPPORTS1(nsDragDropHandler, nsIDragDropHandler)
  100.  
  101. nsDragDropHandler::nsDragDropHandler()
  102. {
  103.   /* member initializers and constructor code */
  104. }
  105.  
  106. nsDragDropHandler::~nsDragDropHandler()
  107. {
  108.   /* destructor code */
  109. }
  110.  
  111. /* void hookupTo (in nsIDOMEventTarget attachPoint, in nsIWebNavigation navigator); */
  112. NS_IMETHODIMP nsDragDropHandler::HookupTo(nsIDOMEventTarget *attachPoint, nsIWebNavigation *navigator)
  113. {
  114.     return NS_ERROR_NOT_IMPLEMENTED;
  115. }
  116.  
  117. /* void detach (); */
  118. NS_IMETHODIMP nsDragDropHandler::Detach()
  119. {
  120.     return NS_ERROR_NOT_IMPLEMENTED;
  121. }
  122.  
  123. /* End of implementation class template. */
  124. #endif
  125.  
  126.  
  127. #endif /* __gen_nsIDragDropHandler_h__ */
  128.